<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 200px;
            height: 200px;
            background-color: goldenrod;
        }
        
        .father {
            margin: 0 auto;
            width: 1000px;
            height: 800px;
            border: 1px solid black;
            background-color: #fff;
            position: relative;
        }
        
        .left {
            position: absolute;
            left: 300px;
        }
        
        .right {
            position: absolute;
            right: 100px;
        }
        
        .bottom {
            position: absolute;
            bottom: 100px;
        }
        
        .top {
            position: absolute;
            top: 100px;
        }
    </style>
</head>

<body>
    <div class="father">
        <div class="left">
            元素左边距与父元素左边界的偏移量为 left:300px；
        </div>
        <div class="right">
            元素右边距与父元素右边界的偏移量为 right:100px；
        </div>
        <div class="top">
            元素上边距与父元素上边界的偏移量为 top:100px；
        </div>
        <div class="bottom">
            元素下边距与父元素下边界的偏移量为 bottom: 100px；

        </div>
    </div>

</body>

</html>